Bentley Map V8i (SELECTseries 10) Help

SELECT

Syntax: SELECT { logical_name | SQL_query }

The SELECT command is used for selecting database attributes using a standard SQL query. Specify this SQL query after the SELECT command or use a defined SELECT statement (defined using the DEFINE SELECT command), which can then be referred to using the logical name of the predefined SQL statement.

For example:

SELECT dimension,material from pipe where id=$(MyID)

This results in the database variables pipe.dimension and pipe.material being filled with the values corresponding to the pipe with the specified ID. The special syntax using $(variablename). Before the command is sent to the database, the $(variable) is expanded so that if MyID equals ‘abc’ the command going to the database looks like this:

SELECT dimension,material from pipe where id=’abc’

This syntax can be used in any database command sent to the database for scripting . Execute the same SELECT query using a logical name defined by the DEFINE SELECT command:

DEFINE SELECT pipe_dim_mat select dimension,material from pipe where id=$(MyID) END ... SELECT pipe_dim_mat